home *** CD-ROM | disk | FTP | other *** search
- /**************************************
- ** BTTEST.CPP - by John Adkins **
- ** 06/05/92 **
- ** **
- ** Test BC++ Btree Class **
- **************************************/
-
- /**************************************
- ****** INCLUDES ********************
- **************************************/
-
- #include "emailnme.h"
- #include <btree.h>
- #include <fstream.h>
-
- /**************************************
- ****** ROUTINES ********************
- **************************************/
-
- void main(int argc, char **argv)
- {
- cout << "BTTest v1.00" << endl;
- cout << "Copyright (C) 1992, John Adkins" << endl;
- cout << "All Rights Reserved" << endl << endl;
-
- if(argc<2)
- {
- cout << "Usage: BTTEST <filename>.NMT" << endl << endl;
- return;
- }
-
- ifstream input(argv[1]);
- Btree tree;
- char buffer[80];
-
- cout << "Loading names..." << endl;
- while(input)
- {
- input.getline(buffer,80);
- if(stricmp(buffer,"[THEIR]")!=0 && strlen(buffer)>0)
- {
- tree.add(* new TEmailName(buffer));
- }
- }
-
- ContainerIterator &ci=tree.initIterator();
-
- cout << "Names:" << endl;
- while(ci)
- cout << ci++ << endl;
- cout << endl << "Done." << endl;
- }
-
- /**************************************
- ****** END OF BTTEST.CPP ***********
- **************************************/
-
-
-